//调用接口配置文件
import { request } from 'config/request'
// 定义接口
// 获取级联列表
export async function parentCode(params) {
    return request({
        url: 'admin/address/queryAllAddress',
        method: 'GET',
        data: params,
    });
};
//楼盘列表
export async function houseListGet(params) {
    return request({
        url: 'admin/estate/adminList',
        method: 'POST',
        data: params,
        headers: {
            "Content-type": "application/json",
        }
    });
};
// admin/propertyConsultant/create 创建置业顾问
export async function createConsultant(params) {
    return request({
        url: 'admin/propertyConsultant/create',
        method: 'POST',
        data: params,
        headers: {
            "Content-type": "application/json",
        }
    });
};
//
// 获取单个需要更新的置业顾问信息
export async function getConsultantInfo(params) {
    return request({
        url: `admin/propertyConsultant/queryDetail`,
        method: 'POST',
        data: params,
    });
};
//
export async function updateConsultantInfo(params) {
    return request({
        url: `admin/propertyConsultant/update`,
        method: 'POST',
        data: { productId: params.productId, propertyConsultantId: params.propertyConsultantId,
            oldProductId:params.oldProductId,displayAvgPoints:params.displayAvgPoints },
        headers: {
            "Content-type": "application/json",
        }
    });
};
